class AddReqFields < ActiveRecord::Migration

  def self.up
    add_column :reqs, :status, :integer # Analyse, validated, development, ...
    add_column :reqs, :status_date, :date
    add_column :reqs, :priority, :integer
    add_column :reqs, :category, :string
    add_column :reqs, :comments, :text
    add_column :reqs, :reference, :string
    add_column :reqs, :sprint_id, :integer
    add_column :reqs, :cost, :float
    add_column :reqs, :origin, :string

    add_column :req_versions, :status, :integer
    add_column :req_versions, :status_date, :date
    add_column :req_versions, :priority, :integer
    add_column :req_versions, :category, :string
    add_column :req_versions, :comments, :text
    add_column :req_versions, :reference, :string
    add_column :req_versions, :sprint_id, :integer
    add_column :req_versions, :cost, :float
    add_column :req_versions, :origin, :string
  end

  def self.down
    remove_column :reqs, :status
    remove_column :reqs, :status_date
    remove_column :reqs, :priority
    remove_column :reqs, :category
    remove_column :reqs, :comments
    remove_column :reqs, :reference
    remove_column :reqs, :sprint_id
    remove_column :reqs, :cost
    remove_column :reqs, :origin

    remove_column :req_versions, :status
    remove_column :req_versions, :status_date
    remove_column :req_versions, :priority
    remove_column :req_versions, :category
    remove_column :req_versions, :comments
    remove_column :req_versions, :reference
    remove_column :req_versions, :sprint_id
    remove_column :req_versions, :cost
    remove_column :req_versions, :origin
  end

end
